package day7.problem2;

//拼三角
//https://ac.nowcoder.com/acm/problem/219046

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int t = scanner.nextInt();
        while(t-- > 0) {
            long[] arr = new long[6];
            for(int i = 0; i<6; i++) {
                arr[i] = scanner.nextInt();
            }
            Arrays.sort(arr);
            if(check(arr)) System.out.println("Yes");
            else System.out.println("No");
        }
    }
    public static boolean check(long[] arr) {
        for(int i = 0; i<6; i++) {
            for(int j = i + 1; j < 6; j++) {
                for(int k = j + 1; k<6; k++) {
                    if(arr[i] + arr[j] > arr[k]) {
                        if(check2(arr, i, j, k)) return true;
                     }
                }
            }
        }
        return false;
    }
    public static boolean check2(long[] arr, int a, int b, int c) {
        long[] t = new long[3];
        int index = 0;
        for(int i = 0; i<6; i++) {
            if(i != a && i != b && i != c) {
                t[index++] = arr[i];
            }
        }
        return t[0] + t[1] > t[2];
    }
}